import java.util.Scanner;

public class studentclass {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int avg = 0, count = 0;
        for (int i = 1; i <= 3; i++) {
            System.out.println("请输入第" + i + "个班级的成绩:");
            count = 0;
            for (int j = 1; j <= 5; j++) {
                System.out.print("请输入第" + j + "个同学的成绩:");
                int score = input.nextInt();
                count += score;
            }
            System.out.println("第" + i + "个班的总分为" + count);
            System.out.println("第" + i + "个班的平均成绩为" + count / 3);
        }
    }
}
